package com.open.capacity.finance.dao;

import com.open.capacity.finance.entity.SpringScheduledCron;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 定时任务表
 *
 * @author
 * @email
 * @date 2020-06-18 17:28:52
 */
@Mapper
public interface SpringScheduledCronDao {

    int save(SpringScheduledCron springScheduledCron);

    int update(SpringScheduledCron springScheduledCron);

    int updateExcuteTime(@Param("cronId") Integer cronId, @Param("lastExcuteTime") Date lastExcuteTime,@Param("lastExcuteStatus") Integer lastExcuteStatus,@Param("lastExcuteLog") String lastExcuteLog, @Param("timeConsuming") Long timeConsuming);

    int delete(Integer id);

    SpringScheduledCron findById(Integer id);

    SpringScheduledCron findByKey(String key);

    List<SpringScheduledCron> findAll(Map<String, Object> params);

}
